from collections import defaultdict

a = "cevaefegsgdghfdefavbdr"
d = defaultdict(lambda : 0)
for i in a:
    d[i] += 1

print(d)
f = sorted(d.items(),key=lambda x:x[1],reverse=True)[:3]
print(f)
